﻿/*
 * EmeCoder v1.2.1.168
 * 作者：Administrator/PC4APPLE
 * 时间：2013-12-24 15:52:16
 * 版权：版权所有 (C) Eme Development Team 2013
*/

﻿using System;
using System.ComponentModel;
using HmFramework.Data;
using HmFramework.Data.Configuration;
using HmFramework.Data.DataAccessLayer;

namespace CuteSprite.Eme.Data.CRM
{
	/// <summary>富力通揽件员工</summary>
	[Serializable]
	[DataObject]
	[Description("富力通揽件员工")]
	[BindIndex("PK__ExpressMixRecipientID__65791F8C43B6BF36", true, "ID")]
	[BindIndex("IX_ExpressMixRecipient_ExpressID", false, "ExpressID")]
	[BindIndex("IX_ExpressMixRecipient_OrganizeID", false, "OrganizeID")]
	[BindIndex("IX_ExpressMixRecipient_StaffID", false, "StaffID")]
	[BindRelation("ExpressID", false, "ExpressMix", "ID")]
	[BindTable("ExpressMixRecipient", Description = "富力通揽件员工", ConnName = "EmeCRM", DbType = DatabaseType.SqlServer)]
	public abstract partial class ExpressMixRecipient<TEntity> : IExpressMixRecipient
	{
		#region 属性

		private Int32 _ID;

		/// <summary>主键</summary>
		[DisplayName("主键")]
		[Description("主键")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "主键", null, "int", 10, 0, false)]
		public virtual Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } }
		}

		private Int32 _ExpressID;

		/// <summary>快件</summary>
		[DisplayName("快件")]
		[Description("快件")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "ExpressID", "快件", null, "int", 10, 0, false)]
		public virtual Int32 ExpressID
		{
			get { return _ExpressID; }
			set { if (OnPropertyChanging(__.ExpressID, value)) { _ExpressID = value; OnPropertyChanged(__.ExpressID); } }
		}

		private Int32 _OrganizeID;

		/// <summary>员工所属部门</summary>
		[DisplayName("员工所属部门")]
		[Description("员工所属部门")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "OrganizeID", "员工所属部门", null, "int", 10, 0, false)]
		public virtual Int32 OrganizeID
		{
			get { return _OrganizeID; }
			set { if (OnPropertyChanging(__.OrganizeID, value)) { _OrganizeID = value; OnPropertyChanged(__.OrganizeID); } }
		}

		private Int32 _StaffID;

		/// <summary>收件员工</summary>
		[DisplayName("收件员工")]
		[Description("收件员工")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(4, "StaffID", "收件员工", null, "int", 10, 0, false)]
		public virtual Int32 StaffID
		{
			get { return _StaffID; }
			set { if (OnPropertyChanging(__.StaffID, value)) { _StaffID = value; OnPropertyChanged(__.StaffID); } }
		}

		private DateTime _CreateOn;

		/// <summary>创建时间</summary>
		[DisplayName("创建时间")]
		[Description("创建时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(5, "CreateOn", "创建时间", null, "datetime", 3, 0, false)]
		public virtual DateTime CreateOn
		{
			get { return _CreateOn; }
			set { if (OnPropertyChanging(__.CreateOn, value)) { _CreateOn = value; OnPropertyChanged(__.CreateOn); } }
		}

		private Int32 _CreateUserID;

		/// <summary>创建用户ID</summary>
		[DisplayName("创建用户ID")]
		[Description("创建用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(6, "CreateUserID", "创建用户ID", null, "int", 10, 0, false)]
		public virtual Int32 CreateUserID
		{
			get { return _CreateUserID; }
			set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } }
		}

		private String _CreateBy;

		/// <summary>创建用户</summary>
		[DisplayName("创建用户")]
		[Description("创建用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(7, "CreateBy", "创建用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String CreateBy
		{
			get { return _CreateBy; }
			set { if (OnPropertyChanging(__.CreateBy, value)) { _CreateBy = value; OnPropertyChanged(__.CreateBy); } }
		}

		#endregion

		#region 获取/设置 字段值

		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case __.ID: return _ID;
					case __.ExpressID: return _ExpressID;
					case __.OrganizeID: return _OrganizeID;
					case __.StaffID: return _StaffID;
					case __.CreateOn: return _CreateOn;
					case __.CreateUserID: return _CreateUserID;
					case __.CreateBy: return _CreateBy;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case __.ID: _ID = Convert.ToInt32(value); break;
					case __.ExpressID: _ExpressID = Convert.ToInt32(value); break;
					case __.OrganizeID: _OrganizeID = Convert.ToInt32(value); break;
					case __.StaffID: _StaffID = Convert.ToInt32(value); break;
					case __.CreateOn: _CreateOn = Convert.ToDateTime(value); break;
					case __.CreateUserID: _CreateUserID = Convert.ToInt32(value); break;
					case __.CreateBy: _CreateBy = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}

		#endregion

		#region 字段名

		/// <summary>取得富力通揽件员工字段信息的快捷方式</summary>
		public partial class _
		{
			///<summary>主键</summary>
			public static readonly Field ID = FindByName(__.ID);

			///<summary>快件</summary>
			public static readonly Field ExpressID = FindByName(__.ExpressID);

			///<summary>员工所属部门</summary>
			public static readonly Field OrganizeID = FindByName(__.OrganizeID);

			///<summary>收件员工</summary>
			public static readonly Field StaffID = FindByName(__.StaffID);

			///<summary>创建时间</summary>
			public static readonly Field CreateOn = FindByName(__.CreateOn);

			///<summary>创建用户ID</summary>
			public static readonly Field CreateUserID = FindByName(__.CreateUserID);

			///<summary>创建用户</summary>
			public static readonly Field CreateBy = FindByName(__.CreateBy);

			private static Field FindByName(String name)
			{
				return Meta.Table.FindByName(name);
			}
		}

		/// <summary>取得富力通揽件员工字段名称的快捷方式</summary>
		public partial class __
		{
			///<summary>主键</summary>
			public const String ID = "ID";

			///<summary>快件</summary>
			public const String ExpressID = "ExpressID";

			///<summary>员工所属部门</summary>
			public const String OrganizeID = "OrganizeID";

			///<summary>收件员工</summary>
			public const String StaffID = "StaffID";

			///<summary>创建时间</summary>
			public const String CreateOn = "CreateOn";

			///<summary>创建用户ID</summary>
			public const String CreateUserID = "CreateUserID";

			///<summary>创建用户</summary>
			public const String CreateBy = "CreateBy";
		}

		#endregion
	}

	/// <summary>富力通揽件员工接口</summary>
	public partial interface IExpressMixRecipient
	{
		#region 属性

		/// <summary>主键</summary>
		Int32 ID { get; set; }

		/// <summary>快件</summary>
		Int32 ExpressID { get; set; }

		/// <summary>员工所属部门</summary>
		Int32 OrganizeID { get; set; }

		/// <summary>收件员工</summary>
		Int32 StaffID { get; set; }

		/// <summary>创建时间</summary>
		DateTime CreateOn { get; set; }

		/// <summary>创建用户ID</summary>
		Int32 CreateUserID { get; set; }

		/// <summary>创建用户</summary>
		String CreateBy { get; set; }

		#endregion

		#region 获取/设置 字段值

		/// <summary>获取/设置 字段值。</summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		Object this[String name] { get; set; }

		#endregion
	}
}